(require 'org)
(add-to-list 'load-path "~/.emacs.d/libs/remember-2.0")
(require 'remember)
(org-remember-insinuate)
(setq org-directory "~/org")
(setq org-agenda-files (list "~/org"))
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswitchb)
(setq org-default-notes-file (concat org-directory "/notes.org"))
(define-key global-map "\C-cr" 'org-remember)

(add-hook 'org-mode-hook 'turn-on-auto-fill)
;(add-hook 'org-mode-hook 'flyspell-mode)
(add-hook 'org-mode-hook 'typopunct-mode)

;; To save the clock history across Emacs sessions:
(setq org-clock-persist 'history)
;(org-clock-persistence-insinuate)

(add-hook 'mail-mode-hook 'turn-on-orgstruct)
(add-hook 'message-mode-hook 'turn-on-orgstruct)
;; (add-hook 'message-mode-hook 'flyspell-mode)

(setq org-log-done 'time)
;; (setq org-todo-keywords
;;       '((sequence "TODO(t)" "WAIT(w@/!)" "|" "DONE(d!)" "CANCELED(c@/!)")))
(setq org-todo-keywords
      '((sequence "TODO(t)" "WAIT(w)" "|" "DONE(d)" "CANCELED(c)")))
(setq org-use-fast-todo-selection t)
(setq org-todo-keyword-faces
           '(;; ("TODO"      . org-warning)
             ("WAIT"      . (:foreground "#c4af00" :weight bold))
             ;; ("DONE"      . (:foreground "blue" :weight bold))
             ;; ("CANCELED"  . (:foreground "blue" :weight bold))
             ))
; (setq org-export-html-use-infojs t)
(setq org-export-html-with-timestamp t)

(setq org-publish-project-alist
      '(("org"
         :base-directory "~/org/"
         :base-extension "org"
         :publishing-directory "~/public_html/org.localhost/"
         :publishing-function org-publish-org-to-html
         :headline-levels 4
         :auto-preamble t
         :section-numbers t
         :table-of-contents t
         :recursive t
         ;; :author "Effy Web Studio"
         ;; :email "dev@effy.eu"
         :footnotes "http://effy.eu"
         :auto-index t
         :index-filename "index.org"
         :index-title "Список проектов"
         :link-up'  "index.html"
         :link-home "index.html"
         ;; :style "<link rel=\"stylesheet\"
         ;;             href=\"../other/mystyle.css\"
         ;;             type=\"text/css\">"
         )))
